<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>路由练习</title>
		<script src="../js/vue.js"></script>
		<script src="../js/vue-router.js"></script>
	</head>
	<body>
		<div id="app">
			<h1>vue路由实现案例练习</h1>
			<!-- 定义路由标签 -->
			<router-link to="/home">router-link标签</router-link>
			<!-- 路由展示区，占位符 -->
			<router-view></router-view>
		</div>
		<template id="homeTem">
			<div>
				<h1>刚刚忘记写了，这是局部组件的内容</h1>
			</div>
		</template>
		<script>
		let homeTem = {
			template:"#homeTem"
		}
		const router = new VueRouter({
			routes:[
				{path:"/home",component:homeTem}
			]
		}) 
		const app = new Vue({
			el:"#app",
			router
		})
		</script>
	</body>
</html>
